from create import User, session
# ret = session.query(User).order_by(User.name.asc()).all()
# for item in ret:
#     print("%d %s %s" %(item.id, item.name, item.extra))

ret = session.query(User).order_by(User.name.asc(), User.id.desc()).all()
for item in ret:
    print("%d %s %s" %(item.id, item.name, item.extra))